#set($layout = "blank.html") 
<div class="space-4"></div>
<div class="row">
	<div class="col-xs-1"></div>
	<div class="col-xs-10">
		<form id="addRoleForm">
		<div class="space-4"></div>
			<div>
				<label> 角色名 <small class="text-info">系统角色名</small></label>
				<div>
					<input class="form-control" type="text" placeholder="请输入角色名" name="name" data-type='required' data-error='请输入角色名' />
				</div>
			</div>
			<div class="space-20"></div>
			<div>
				<label>角色描述<small class="text-info">关于角色的详细描述</small></label>
				<div>
					<input class="form-control" type="text" placeholder="请输入角色描述" name="description" data-type='required' data-error='请输入角色描述'>
				</div>
			</div>
			<div class="space-12"></div>
			<div class="pull-right" style="margin-right:45px">
				<button type="button" class="btn btn-sm btn-primary" onclick="save()">
					<i class="fa fa-save"></i> 提交
				</button>
				<button class="btn btn-sm btn-warning btn-dialog-undo">
					<i class="fa fa-undo"></i> 返回
				</button>
			</div>
		</form>
	</div>
	<div class="col-xs-1"></div>
</div>
<script>
	function save(){
		var flag=$('input').validation();
		if(flag){
		$.post(getRootPath() + '/role/add',$('#addRoleForm').serialize(),commonAjaxCallBasck, 'json');
		}
	}
</script>